package com.norway.sms;

import android.app.Service;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
import android.os.IBinder;
import android.util.Log;

public class SmsService extends Service
{
	private SMSObserver smsObserver;
	@Override
	public IBinder onBind(Intent arg0)
	{
		return null;
	}
	@Override
	public void onCreate()
	{
		super.onCreate();
		Log.d("INFO", "onCreate SmsService");
		setSMSObserver();
	}
	private void setSMSObserver()
	{
		smsObserver= new SMSObserver(new Handler(),this);
		this.getContentResolver().registerContentObserver(Uri.parse("content://sms"), true, smsObserver);
	}
	@Override
	public void onStart(Intent intent, int startId)
	{
		super.onStart(intent, startId);
	}
	
}
